package com.ml.mall.service.category;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.IService;
import com.ml.mall.bean.base.ApiRestResult;
import com.ml.mall.bean.page.Page;
import com.ml.mall.bean.req.category.*;
import com.ml.mall.bean.res.category.CategoryBriefRes;
import com.ml.mall.bean.res.category.CategoryRes;
import com.ml.mall.bean.res.category.CategoryTree;
import com.ml.mall.entity.category.SysACategory;

import java.util.List;

public interface SysACategoryService extends IService<SysACategory>{

    /**
     * @description    :创建目录
     * @author         :zxm
     * @date           :2021/5/14
    **/
    ApiRestResult createCategory(CategoryNewDto dto);

    /**
     * @description    :修改目录
     * @author         :zxm
     * @date           :2021/5/14
    **/
    ApiRestResult editCategory(CategoryEditDto dto);

    /**
     * @description    :删除目录
     * @author         :zxm
     * @date           :2021/5/14
    **/
    ApiRestResult removeCategory(List<Long> ids);

    /**
     * @description    :树状目录查询
     * @author         :zxm
     * @date           :2021/5/17
    **/
    CategoryTree queryTreeCategory(CategoryDto dto);

    /**
     * @description    :分页查询目录
     * @author         :zxm
     * @date           :2021/5/17
    **/
    Page<CategoryRes> queryPageCategory(CategoryQueryDto dto);

    /**
     * @description    :添加子目录
     * @author         :zxm
     * @date           :2021/5/17
    **/
    ApiRestResult addSubCategory(CategorySubNewDto dto);

    /**
     * @description    :查询根目录下面的全部一级子目录
     * @author         :zxm
     * @date           :2021/5/27
    **/
    List<CategoryBriefRes> queryLevel1Category(CategoryDto dto);

    /**
     * 根据根目录查询子目录；
     * @param dto
     * @return
     */
    ApiRestResult queryAllSubByRootCategoryId(CategoryQueryAllSubDto dto);

    /**
     * @description: 目录查询
     * @author kyyang
     * @date 2021/8/28 14:38
     * @version 1.0
     */
    ApiRestResult categorySearch(CategorySearchDto dto);
}
